home *** CD-ROM | disk | FTP | other *** search
Java Source | 2000-09-08 | 316 b | 15 lines |
- class ThrowsDemo {
- static void procedure() throws IllegalAccessException {
- System.out.println(" inside procedure");
- throw new IllegalAccessException("demo");
- }
-
- public static void main(String args[]) {
- try {
- procedure();
- }
- catch (IllegalAccessException e) {
- System.out.println("caught " + e);
- }
- } }
-